#ifndef MAIN_H_
#define MAIN_H_
#include <irrlicht.h>
#include "scn/scn.h"
#include "myarray.h"


extern irr::scene::ICameraSceneNode * camera;
extern char * BaseDirectory;

bool loadScnFile(io::path);
bool closeCurrentScnFile();
void selectCurSurface(bool bAppend=false);
bool scnRetexture(io::path);
bool scnRetexture_UV(f32 Ushift, f32 Vshift);
bool scnSaveFile();

void uvgrid_increase();
void uvgrid_decrease();
void toggleUVresize();

void updateBufferUVfromScnSurf(core::array<u32>);
void updateBufferUVfromScnSurf(u32 s);
void selectUVVert(bool bAppend);

//core::array<u32> * calcVertsShared_b(u32 i);


//core::array<u32> selectSharedSurfaces(u32 i);
//core::array<u32> selectAllSharedSurfaces(u32 i);

char * getBaseDirectory();
void putBoxesInSharedVerts();
void saySurfProps();

arrayu getSurfUVIdxs(arrayu);
arrayu getSurfUVIdxs(array<u32>);
arrayu getSurfUVIdxs(u32 ss);

void export2obj();
void whereami();



#endif


